<!DOCTYPE html>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    if (session.getAttribute("loggedIn") != null) {
        if (((Boolean) session.getAttribute("loggedIn"))) {

            if (session.getAttribute("role").equals("admin")) {
                response.sendRedirect("managerHome.jsp");
            } else if (session.getAttribute("role").equals("courier")) {
                response.sendRedirect("courier_shipments.jsp");
            }
        }
    }
%>
<html>
    <head>
        <link rel='stylesheet' type="text/css" href='./bootstrap/css/bootstrap.min.css'>
        <title>Login Page</title>
    </head>
    <body style="min-height: 100%;  height: 100%;">
        <div class="container" style="width: 1280px; min-height: 100%;  height: 100%; margin: 0 auto; background-color: white;">
            <h1 style="text-align: center; font-size: 500%; font-weight: bold; color:grey; line-height:80%; padding-left:2%; padding-top: 2%"><f:message key="Headline"/></h1>
            <hr>
            <div style="width: 320px; margin: 0 auto;">
                <form class="form-inline" method="post" action="login">
                    <div class="control-group error">
                        <label class="control-label" for="inputError">Input with error</label>
                        <div class="controls">
                            <input id="inputLogin" type="text" placeholder="Login" class="input-small" name="name"/>
                            <input id="inputPassword" type="password" placeholder="Password" class="input-small" name="password"/>
                            <button type="submit" value="submit" class="btn"><f:message key="login"/></button>
                            <span class="help-inline">Login failed</span>
                        </div>
                    </div>
                </form>
                <a href="/pa165/index.jsp/customerSearchOrder.jsp" class="btn btn-block btn-success"><f:message key="customerEntry"/></a>
                <BR>
                <BR>
                <img style="width:350px;" src="http://www.ukvananddriverhire.co.uk/van%20logo.jpg" class="img-rounded">
            </div>
        </div>
    </body>
</html>
